
export const portal = {
  path: '/',
  name: 'login',
  component: () => import('../components/login.vue')
};

export const portalRouter = [
    {
      path: '/index',
      name: 'index',
      title:'首页',
      redirect:'/home',
      component: () => import('../components/index.vue'),
      children:[
        {
          path:'/home',
          name:'home',
          title:'首页内容',
          component:()=>import('../components/home/home.vue')
        },
        {
          path:'/ac',
          name:'ac',
          redirect:'/ac-user',
          title:'鉴权中心',
          component:()=>import('../components/ac/index.vue'),
          children:[
            {
              path:'/ac-user',
              name:'ac-user',
              title:'鉴权中心-用户',
              component:()=>import('../components/ac/ac-user.vue')
            },
            {
              path:'/ac-role',
              name:'ac-role',
              title:'鉴权中心-角色',
              component:()=>import('../components/ac/ac-role.vue')
            },
            {
              path:'/ac-menu',
              name:'ac-menu',
              title:'鉴权中心-权限菜单',
              component:()=>import('../components/ac/ac-menu.vue')
            },
          ]
        },
        {
          path:'/fs',
          name:'fs',
          title:'文件系统',
          component:()=>import('../components/fs/index.vue'),
        },
        {
          path:'/wp',
          name:'wp',
          title:'工作计划管理',
          component:()=>import('../components/wp/index.vue'),
        },
        {
          path:'/finance',
          name:'finance',
          title:'财务管理',
          redirect:'/f-summary',
          component:()=>import('../components/finance/index.vue'),
          children:[
            {
              path:'/f-summary',
              name:'f-summary',
              title:'汇总表',
              component:()=>import('../components/finance/fsummary.vue'),
            },
            {
              path:'/f-income',
              name:'f-income',
              title:'利润表',
              component:()=>import('../components/finance/income.vue'),
            },
            {
              path:'/f-receipt',
              name:'f-receipt',
              title:'资金管理',
              component:()=>import('../components/finance/receipt.vue'),
            },
            {
              path:'/f-wages',
              name:'f-wages',
              title:'工资核算',
              component:()=>import('../components/finance/wages.vue'),
            },
            {
              path:'/f-goods',
              name:'f-goods',
              title:'库存管理-库存信息',
              component:()=>import('../components/finance/goods.vue'),
            },
            {
              path:'/f-inbound',
              name:'f-inbound',
              title:'库存管理-入库',
              component:()=>import('../components/finance/inbound.vue'),
            },
            {
              path:'/f-outbound',
              name:'f-outbound',
              title:'库存管理-出库',
              component:()=>import('../components/finance/outbound.vue'),
            },
            {
              path:'/f-project',
              name:'f-project',
              title:'项目管理',
              component:()=>import('../components/finance/project.vue'),
            },
          ]
        },
        {
          path:'/notice',
          name:'notice',
          title:'通告信息管理',
          component:()=>import('../components/notice/index.vue'),
        },
        {
          path:'/hr',
          name:'hr',
          redirect:'/hr-zzjg',
          title:'人力资源管理',
          component:()=>import('../components/hr/index.vue'),
          children:[
            {
              path:'/hr-zzjg',
              name:'hr-zzjg',
              title:'人力资源管理-组织机构',
              component:()=>import('../components/hr/hr-zzjg.vue')
            },
            {
              path:'/hr-gwsz',
              name:'hr-gwsz',
              title:'人力资源管理-岗位设置',
              component:()=>import('../components/hr/hr-gwsz.vue')
            },
            {
              path:'/hr-jg',
              name:'hr-jg',
              title:'人力资源管理-组织架构',
              component:()=>import('../components/hr/hr-jg.vue')
            },
            {
              path:'/hr-xcgl',
              name:'hr-xcgl',
              title:'人力资源管理-薪酬管理',
              component:()=>import('../components/hr/hr-xcgl.vue')
            },
            {
              path:'/hr-rlda',
              name:'hr-rlda',
              title:'人力资源管理-人力档案',
              component:()=>import('../components/hr/hr-rlda.vue')
            },
          ]
        },
      ]
    }
];

// 所有上面定义的路由都要写在下面的routers里
export const routers =  [
    portal,
    ...portalRouter,
  ];


